package org.seefly.iprint.entity;

import lombok.Data;

import java.util.Date;
@Data
public class User {
    private Integer id;

    private String name;

    private String nikename;

    private String psw;

    private Integer status;

    private String mail;

    private String phone;

    private Integer type;

    private Date registerTime;

    private Date loginTime;

    private Date lastLoginTime;

    private Integer loginCount;

    private String bindPostion;

    private String salt;


    public void updateLoginTime() {
        this.lastLoginTime = this.loginTime;
        this.loginTime = new Date();
    }
    
    public void increaseLoginCount() {
        this.loginCount ++;
    }

}